Skip to content

Add CI tests for optional dependencies - #1654

Open
Sevans711 wants to merge 7 commits into
refactor-optional-dependenciesfrom
sevans/tests-for-optional-deps
Open

Add CI tests for optional dependencies#1654
Sevans711 wants to merge 7 commits into
refactor-optional-dependenciesfrom
sevans/tests-for-optional-deps

Conversation

@Sevans711

Copy link
Copy Markdown
Collaborator

Addresses part of #1224, #1225 but does not fully close them.

Overview

Provides tests for optional dependencies, as discussed in #1548 (comment). Adds a new CI job step to run these tests. Basically the job steps are:

  • (A) make and activate new venv; install without any optional dependencies; run corresponding tests
  • (B) make and activate new venv; install with only the viz optional deps; run corresponding tests
  • (C) make and activate new venv; install with only the geo optional deps; run corresponding tests
  • (D) make and activate new venv; install with the viz and geo optional deps; run corresponding tests

The corresponding tests include checks which:

  1. should pass everywhere
  2. should pass as long as at least viz is installed
  3. should pass as long as at least geo is installed
  4. should pass only when both viz and geo are installed

And, "run corresponding tests" attempts all four checks, marking appropriately with with pytest.raises(ImportError) to ensure checks pass/fail as expected. E.g., case (C) marks (2) and (4) with expecting ImportError, but expects (1) and (3) to pass without any issues.

PR Checklist

General

  • An issue is created and linked
  • Added appropriate labels (if your uxarray repo permissions allow it)
  • Filled out Overview and Expected Usage (if applicable) sections

Testing & Benchmarking

  • Adequate tests are created if there is new functionality
  • Tests are not too basic (such as simply calling a function and nothing else)
  • Tests cover all major paths in your new functions
  • [N/A] If this PR could affect performance, ran ASV benchmarks and confirmed they show expected behavior (add a new benchmark if necessary)

@Sevans711 Sevans711 changed the title add test_optional_deps files & ci commands Add CI tests for optional dependencies Aug 6, 2026
(maybe not necessary… but also trying to re-trigger CI jobs here, due to github actions downtime yesterday causing stalled jobs with no "rerun jobs" button available.)
@Sevans711 Sevans711 added dependencies Pull requests that update a dependency file testing Test Cases CI Continuous Integration github_actions Pull requests that update GitHub Actions code labels Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI Continuous Integration dependencies Pull requests that update a dependency file github_actions Pull requests that update GitHub Actions code testing Test Cases

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant